<template>
	<div class="scroll clearfix">
		<a href="javascript:;" class="leftone">
			<s></s>
		</a>
		<a href="javascript:;" class="rightone">
			<s></s>
		</a>
		<div class="scroll-in clearfix">
			<ul id='scrollBox' class="clearfix">
				<li style="height:100%;" class="banners"><a href="#"><img src="./src/style/img/banner.png" alt=""/></a></li>
				<li style="height:100%;" class="banners"><a href="#"><img src="./src/style/img/banner2.png" alt=""/></a></li>
				<li style="height:100%;" class="banners"><a href="#"><img src="./src/style/img/banner3.png" alt=""/></a></li>
			</ul>
			<ol class="olList">
			</ol>
		</div>
		<div class="form banxin index-box">
			<div class="flr">
				<h3>第一志愿推荐系统</h3>
				<div class="checkbox">
					<select>
						<option value="江苏">考区：江苏</option>
						<option :value="item.dataname" v-for="item of getLevelData">{{item.dataname}}</option>
					</select>
					<input type="checkbox">文科
					<input type="checkbox">理科
				</div>
				<div class="com-fen clearfix">
					<span class="fll">分数</span>
					<input type="text" class="fll" placeholder="请输入高考预估分">
					<i>分</i>
				</div>
				<div class="com-fen clearfix">
					<span class="fll">院校批次</span>
					<select name="" >
						<option>本科</option>
						<option>专科</option>
					</select>
				</div>
				<div class=clearfix>
					<div class="com-fen fll clearfix com">
						<span class="fll">物理</span>
						<select name="" >
							<option value="">A+</option>
							<option value="">A-</option>
							<option value="">B+</option>
							<option value="">B-</option>
						</select>
					</div>
					<div class="com-fen fll clearfix com">
						<span class="fll">化学</span>
						<select name="" >
							<option value="">A+</option>
							<option value="">A-</option>
							<option value="">B+</option>
							<option value="">B-</option>
						</select>
					</div>
				</div>
				<a href="javascript:void(0)" @click="showTips">开始推荐学校</a>
			</div>
		</div>
		<div class="tab-nav display-none">
			<div class="tabUl banxin display-none banxin-school-groom">
				<a href="javascript:void(0)" class="active">按分推荐大学</a>
				<a href="javascript:void(0)">智能填志愿</a>
				<a href="javascript:void(0)">模拟填志愿</a>
				<a href="javascript:void(0)">录取率测试</a>
				<a href="javascript:void(0)">成绩分析报告</a>
				<a href="javascript:void(0)">看就业选学校</a>
				<a href="javascript:void(0)">看就业选专业</a>
				<a href="javascript:void(0)">看职业选专业</a>
			</div>
			<div class="tabUl banxin display-none banxin-information-bank">
				<a href="javascript:void(0)"  class="active">院校大全</a>
				<a href="javascript:void(0)">专业大全</a>
				<a href="javascript:void(0)">大学排行</a>
				<a href="javascript:void(0)">专业排行</a>
				<a href="javascript:void(0)">真假院校</a>
			</div>
		</div>
	</div>	
</template>
<script>
	//记录数据到session
function setData() {
	var options = {
		score: null,
		city: null,
		kelei: null
	};
	$('input.fll').change(function (e) {
		options.score = $(this).val();
		setSession('mybase', options);
	});
	$('.checkbox').find('select').on('change', function (e) {
		options.city = $(this).val();
		setSession('mybase', options);
	});
	$('.checkbox').find('input').click(function () {
		$.each($('.checkbox').find('input'), function (index, item) {
			if (item.checked) {
				if (index == 0) {
					options.kelei = "文科";
				} else {
					options.kelei = "理科";
				}
			}
			setSession('mybase', options);
		});
	});
}
function setSession(key, obj) {
	sessionStorage.setItem(key, JSON.stringify(obj));
}
module['index-carousel'] = {
	props: ['d'],
	template: template,
	data: function data() {
		return {
			getLevelData: [] //地区接口
		};
	},
	created: function created() {
		var that = this;
		base.request(base.api(6), {
			group: 'schoolArea'
		}, function (d) {
			that.getLevelData = d.data;
		});
	},
	methods: {
		showTips: function showTips() {
			document.querySelector('#tips').style.display = 'block';
		}
	},
	mounted: function mounted() {
		$(setData);
		qiangge(1000, 4000);
	}
};
</script>